<xsl:template match='/'>
\documentclass[12pt]{article}
\usepackage[dutch]{babel}
\usepackage[latin1]{inputenc}
\usepackage{array}
\usepackage[a4paper,tmargin=2cm,lmargin=0.5cm,landscape]{geometry}
\setlength{\textwidth}{28.5cm}
\setlength{\textheight}{19cm}
\setlength\arrayrulewidth{.1pt}
\renewcommand{\arraystretch}{1.35}
\setlength{\tabcolsep}{0.1cm}
\pagestyle{empty}
\begin{document}
\noindent
\parbox{28.5cm}{
\begin{tabular}{|p{9.3cm}&gt;{\centering}p{9.3cm}&gt;{\hfill}p{9.3cm}|}
\hline
\rule{0cm}{0.5cm}
\large <xsl:value-of select='//leerling/klas' />&amp;&amp;Sint-Ritacollege\\
\large <xsl:value-of select='//leerling/voornaam' />&#160;<xsl:value-of select='//leerling/achternaam' /> - (<xsl:value-of select='//leerling/klasnr' />) &amp;Semesterrapport 1 &amp;<xsl:value-of select='//rapport/@jaar' />-<xsl:value-of select='//rapport/@jaar + 1' />\\
\hline
\end{tabular}}
\\[0.3cm]
\noindent
\parbox[t]{2cm}{\mbox{ }

\noindent
\begin{tabular}{|p{1.8cm}&lt;{\centering}|}
\hline
  \\
\hline
\hline
<xsl:for-each select="//vakken/*">
    <xsl:sort select="@volgNr" />
    <xsl:call-template name="vaknaam" />
</xsl:for-each>
\hline
\hline
AT \\
\hline
\end{tabular}}
\parbox[t]{6cm}{\mbox{ }

\noindent
\begin{tabular}{|>{\centering}p{1.8cm}|>{\centering}p{1.8cm}|p{1.8cm}&lt;{\centering}|}
\hline
  DW &amp; EX &amp; TOT\\
\hline
\hline
<xsl:for-each select="//vakken/*">
    <xsl:sort select="@volgNr" />
    <xsl:call-template name="vakcijfers" />
</xsl:for-each>
\hline
\hline
\multicolumn{2}{|c|}{Totaal semester 1} &amp;<xsl:value-of select="//totaal/tottot1" />\\
\hline
\end{tabular}}
\parbox[t]{2cm}{\mbox{ }

\noindent
\begin{tabular}{|p{1.8cm}&lt;{\centering}|}
\hline
  KG\\
\hline
\hline
<xsl:for-each select="//vakken/*">
    <xsl:sort select="@volgNr" />
    <xsl:call-template name="vakgemiddelde" />
</xsl:for-each>
\hline
\hline
  <xsl:value-of select="//totaal/tottot1gem" />\\
\hline
\end{tabular}}
\hfill
\parbox[t]{16,798cm}{\mbox{ }

\noindent 
\begin{tabular}{|p{16,598cm}|}
\hline
Woordcommentaar klasleraar

\rule{0cm}{3.8cm}\\
\hline
Handtekening klasleraar\\
\hline
\end{tabular}
\\[0.05cm]
\noindent \begin{tabular}{|p{16,598cm}|}
\hline
Woordcommentaar ouders

\rule{0cm}{3.8cm}\\
\hline
Handtekening ouders\\
\hline
\end{tabular}
\\[0.05cm]
\noindent \begin{tabular}{|p{16,598cm}|}
\hline
Woordcommentaar leerling

\rule{0cm}{3.8cm}\\
\hline
Handtekening leerling\\
\hline
\end{tabular}}
\end{document}
</xsl:template>

<xsl:template name="vaknaam">
 <xsl:value-of select="name()" /> - <xsl:value-of select="uren" />\\
\hline
</xsl:template>  

<xsl:template name="vakcijfers">
 <xsl:value-of select="dw1" />&amp;<xsl:value-of select="ex1" />&amp;<xsl:value-of select="tot1" />\\
\hline
</xsl:template>

<xsl:template name="vakgemiddelde">
 <xsl:value-of select="tot1gem" />\\
\hline
</xsl:template>